const express=require('express');
const path=require('path');

//控制器
const {user, friends, sms, app_version} = require(path.join(__dirname,'../../constrollers'));


module.exports = function(){
	var router = express.Router();
	
	router
	//短信发送
	.post('/sms', sms.send)
	
	//获取App最新版本
	.get('/chat_version/lastest', app_version.getLastest)
	
	.get('/user', user.list)
	.get('/user/get_person_info', user.getPersonInfo)
	.post('/user/register', user.register)
	.post('/user/reset_password', user.reset_password)
	.post('/user/modify_password', user.modify_password)
	.post('/user/modify_info', user.modify_info)
	.post('/user/change_telephone', user.change_telephone)
	.post('/user/login', user.login)
	.post('/user/feedback_suggestion', user.feedback_suggestion)
	
	.get('/friends', friends.list)
	.post('/friends/add', friends.addFriend)
	.post('/friends/delete', friends.deleteFriend)
	
	
	
	return router;
}

